[stable33] fix(UserConfig): cast getTypedValue() result to string in getValueBool() to fix PHP 8.4 TypeError#59630
Conversation
…le33 [stable33] fix: provide `canDownload` helper for shares and use it where appropriate
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
…line Signed-off-by: Joas Schilling <coding@schilljs.com>
As we do it with other information of the user, we now use the known value of a users displayname, and leave the updating to the background job. This improves performance of user facing actions where the display name is required and reduces queries to the LDAP server that are typically more expensive. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
…le33 [stable33] fix(comments): Correctly treat end of message as end of code block/in…
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
…le33 [stable33] fix(files_external): properly handle API errors
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.2 to 3.3.3. - [Release notes](https://github.com/cure53/DOMPurify/releases) - [Commits](cure53/DOMPurify@3.3.2...3.3.3) --- updated-dependencies: - dependency-name: dompurify dependency-version: 3.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This is important especially for local development, as certificate are self-signed. Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
…le33 [stable33] fix(LDAP): use displayname from DB, before reaching out to LDAP
…yarn/build/frontend-legacy/stable33/dompurify-3.3.3 [stable33] chore(deps): Bump dompurify from 3.3.2 to 3.3.3 in /build/frontend-legacy
…le33 [stable33] fix(files): fix tab navigation from select all checkbox to batch actions
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
…le33 [stable33] fix: add fallback to raw path info
…4000 to 32000 Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
…le33 [stable33] fix: Add missing Attribute and fix parameter type in renewpassword route
…le33 [stable33] fix(files_sharing): respect config to skip certificate verification
…le33 [stable33] fix(bg_jobs): store job argument as a text, increase length cap to 32000
|
Hi @thereisnotime please always target the master branch first. Then we can look into backporting to required stable branchs. Thanks! |
Then maybe we should fix |
Also, please at least remove AI boilerplate when answering, this just sound disrespectful :) |
|
Retargeted to master, thanks for the heads up. On fixing The |
|
Closing in favour of a clean PR based directly on master. The previous branch was cloned from stable33 causing a huge diff. |
Summary
Fixes #59629
PHP 8.4 made passing non-strings to
strtolower()a fatalTypeError(previously a deprecation).UserConfig::getValueBool()callsstrtolower()directly on the return value ofgetTypedValue(), which can return a non-string when stored value type metadata doesn't align withValueType::BOOL.In practice this manifests when
user_ldapcallsgetValueBool($uid, 'user_ldap', 'isDeleted')— the storedisDeletedpreference has no type metadata, causinggetTypedValue()to return a non-string, which then breaksstrtolower()in PHP 8.4.Change
One-character fix: add
(string)cast before thestrtolower()call. This is safe and defensive —getTypedValue()is already declared to returnstring, so this is a no-op in the happy path and a guard for edge cases.Impact
Without this fix, on PHP 8.4 + NC 33 with
user_ldapenabled:TypeError: strtolower(): Argument #1 ($string) must be of type string, string givenRelated
user_ldapfix